package com.demo.structural.decorator;

public class NewCalculator implements Calculate{
	
	private Calculator calculator;
	
	public NewCalculator(Calculator calculator){
		this.calculator = calculator;
	}

	public void plus() { 
		System.out.println("new plus start");
		calculator.plus();
		System.out.println("new plus end");
	}

	public void minus() { 
		//照抄旧方法
		calculator.minus(); 
	}

}
